<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8;" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/Homepage/style.css">
<link href="__PUBLIC__/css/findpw/style.css" type="text/css" rel="stylesheet"></link>
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.11.0.min.js" ></script>
<script>
$(function(){

  $(document).keypress(function(e) { 
  // 回车键事件 
   if(e.which == 13) { 
		$('#submit').trigger("click");
   } 
   })
  
  $('#submit').click(function(){
 
     ans1=($("#ans1").val());
     ans2= ($("#ans2").val());
	 if(ans1==""){
		alert('答案1不能为空');
		return false;
	 }else if(ans2==""){
		alert('答案2不能为空');
		return false;	 
	 }

     $.ajax({
             type: "POST",
             url: "{:U('oper')}",
			 data: {from:2,ans1:ans1,ans2:ans2},
			 dataType: "text",
             success: function(data){		 
					if(data==1){
						alert("问题1答案错误");					
					}else if(data==2){
						alert("问题2答案错误");
					}else if(data==3){
						window.location.href="{:U('resetpsw')}";
					}
						
			 }
			})	
 })
 })
</script>
</head>
<body>
	<div class="menu">
		<include file="Public/home_header" />
		<div class="menu1">
			<form  name="myform" id="myform"  method="POST">
				<p class="title">找回密码</p>
				<table class="pwpr_title1">
					<tr><td class="pwpr_title2" colspan=2>说明:请输入你原来的密码保护问题的答案！！！</td></tr>
					<tr><td class="pwpr_password">密保问题1:</td><td class="pwpr_password1">{$dq1}</td></tr>
					<tr><td class="pwpr_password">密保答案1:</td><td class="pwpr_text"><input type="text" name="ans1" id="ans1"></td></tr>
					<tr><td class="pwpr_password">密保问题2:</td><td class="pwpr_password1">{$dq2}</td></tr>
					<tr><td class="pwpr_password">密保答案2:</td><td class="pwpr_text"><input type="text" name="ans1" id="ans2"></td></tr>
					<tr><td></td><td class="pwpr_sure" ><div id="submit">确&nbsp&nbsp&nbsp&nbsp定</div></td></tr>
				</table>
			</form>
		</div>
		<include file="Public/home_footer" />
	</div>
</body>
</html>